package gitdemo1.git3.demo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.Arrays;

public class Test1 {
    public static void main(String[] args)  {

//            FileInputStream fis = new FileInputStream("D:\\excel\\aa.txt");
//            FileOutputStream fos = new FileOutputStream("D:\\excel\\aa.txt");
//            byte[] bt = new byte[1024];
//            fos.write("abcd".getBytes());
//            int len;
//            while((len=fis.read(bt))!=-1){
//                System.out.println(new String(bt,0,len));
//            }
//            fis.close();
//            fos.close();
        System.out.println(-9>>2);

//        System.out.println(-10>>2);
//        System.out.println(-12>>2);
//
//        System.out.println(12>>2);
    }

    public static void chose(int arr[]){
        if (arr.length==0){
            return;
        }
        for (int i = 0; i < arr.length-1; i++) {
            int index=arr[i];
            for (int j = i+1; j < arr.length; j++) {
                if (index>arr[j]){
                    swap(arr,i,j);
                }
            }
        }

    }

    public static void inserSort(int arr[]){
        if(arr==null||arr.length<2){
            return;
        }
        for (int i = 1; i < arr.length; i++) {
            for (int j = i-1; j>=0&&arr[j]>arr[j+1]; j--) {
                swap(arr, j, j+1);
            }
        }
    }


    private static void swap(int[] arr, int i, int j) {
        int temp=arr[i];
        arr[i]=arr[j];
        arr[j]=temp;
    }
}
